//
//  ArgumentStore.h
//  CustomerServer
//
//  Created by 涂俊 on 2019/4/12.
//  Copyright © 2019年 Facebook. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface ArgumentStore : NSObject

@property (nonatomic, strong, readwrite) NSString* appId;//客服系统appId
@property (nonatomic, strong, readwrite) NSString* pubKey;//客服系统签名key
@property (nonatomic, strong, readwrite) NSString* baseUrl;//客服系统服务器端url
@property (nonatomic, strong, readwrite) NSString* log;//客服系统日志开关

  
@property (nonatomic, strong, readwrite) NSString *imAppKey;//环信会话Id
@property (nonatomic, strong, readwrite) NSString *imTenantId;//环信会话Id
@property (nonatomic, strong, readwrite) NSString *conversationId;//环信会话Id

//用户信息
@property (nonatomic, strong, readwrite) NSString* uid;
@property (nonatomic, strong, readwrite) NSString* roleId;
@property (nonatomic, strong, readwrite) NSString* roleName;
@property (nonatomic, strong, readwrite) NSString* serverName;
@property (nonatomic, strong, readwrite) NSString* gameName;
@property (nonatomic, strong, readwrite) NSString* gameVersion;
@property (nonatomic, strong, readwrite) NSString* channelId;
@property (nonatomic, strong, readwrite) NSString* sdkId;
@property (nonatomic, strong, readwrite) NSString* os;
@property (nonatomic, strong, readwrite) NSString* network;
@property (nonatomic, strong, readwrite) NSString* rom;
@property (nonatomic, strong, readwrite) NSString* ram;

// "0"：游戏客服， "1"：用户中心客服
@property(nonatomic, strong, readonly)NSString *type;

//初始化获取的配置
@property (nonatomic, strong, readwrite) NSString* configInit;
//im登录结果（ok,fail,logging）
@property (nonatomic, strong, readwrite) NSString* imLoginResult;

// 当前登录的
@property (nonatomic, strong, class, nullable)ArgumentStore *current;

+ (instancetype)getInstance;

+ (instancetype)opInstance;

+ (instancetype)instanceForKey:(NSString *)key;

- (NSString *) getCache:(NSString *)key;

- (void)setCache:(NSString *)value forKey:(NSString *)key;

// 将环信用户名和密码，持久化到本地
- (void)saveUserWithUid:(NSString *)uid
                 roleId:(NSString *)roleId
             imUsername:(NSString *)imUsername
             imPassword:(NSString *)imPassword;

// 获取环信账号名和密码
- (NSArray *)getUserByUid:(NSString *)uid
                   roleId:(NSString *)roleId;

@end

NS_ASSUME_NONNULL_END
